import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';


enum SharedPlant{
    wechat,
    qq,
    weibo
}

class shareManager {
    //创建通道
    static const MethodChannel _channel = const MethodChannel('umshared');

    //1.创建初始化友盟的方法
    static void initUmSdk() {
      _channel.invokeMethod('initSdk');
    }
     //分享数据
    static void shared(final image,String text,SharedPlant plant) {
       _channel.invokeMethod('sharedData',{'text':text,'type':plant.index,'image':image});
    }
}